An Isabelle/HOL Formalization of the Textbook Proof of Huffman’s Algorithm∗
نویسنده
چکیده
Huffman’s algorithm is a procedure for constructing a binary tree with minimum weighted path length. This report presents a formal proof of the correctness of Huffman’s algorithm written using Isabelle/HOL. Our proof closely follows the sketches found in standard algorithms textbooks, uncovering a few snags in the process. Another distinguishing feature of our formalization is the use of custom induction rules to help Isabelle’s automatic tactics, leading to very short proofs for most of the lemmas.
منابع مشابه
Formalizing the Edmonds-Karp Algorithm
We present a formalization of the Ford-Fulkerson method for computing the maximum flow in a network. Our formal proof closely follows a standard textbook proof, and is accessible even without being an expert in Isabelle/HOL — the interactive theorem prover used for the formalization. We then use stepwise refinement to obtain the Edmonds-Karp algorithm, and formally prove a bound on its complexi...
متن کاملFormalizing Push-Relabel Algorithms
We present a formalization of push-relabel algorithms for computing the maximum flow in a network. We start with Goldberg’s et al. generic push-relabel algorithm, for which we show correctness and the time complexity bound of O(V E). We then derive the relabel-tofront and FIFO implementation. Using stepwise refinement techniques, we derive an efficient verified implementation. Our formal proof ...
متن کاملFlow Networks and the Min-Cut-Max-Flow Theorem
We present a formalization of flow networks and the Min-Cut-MaxFlow theorem. Our formal proof closely follows a standard textbook proof, and is accessible even without being an expert in Isabelle/HOL— the interactive theorem prover used for the formalization.
متن کاملExtracting a Normalization Algorithm in Isabelle/HOL
We present a formalization of a constructive proof of weak normalization for the simply-typed λ-calculus in the theorem prover Isabelle/HOL, and show how a program can be extracted from it. Unlike many other proofs of weak normalization based on Tait’s strong computability predicates, which require a logic supporting strong eliminations and can give rise to dependent types in the extracted prog...
متن کاملIsabelle/Circus
The Circus specification language combines elements for complex data and behavior specifications, using an integration of Z and CSP with a refinement calculus. Its semantics is based on Hoare and He’s unifying theories of programming (UTP). Isabelle/Circus is a formalization of the UTP and the Circus language in Isabelle/HOL. It contains proof rules and tactic support that allows for proofs of ...
متن کامل